{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "f84cb266-8976-4e43-a43a-196436053f56",
   "metadata": {},
   "outputs": [
    {
     "ename": "ModuleNotFoundError",
     "evalue": "No module named 'deap'",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mModuleNotFoundError\u001b[0m                       Traceback (most recent call last)",
      "Cell \u001b[1;32mIn[1], line 4\u001b[0m\n\u001b[0;32m      1\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mdata_parsers\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mcustom_instance_parser\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m parse\n\u001b[0;32m      2\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mplotting\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mdrawer\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m plot_gantt_chart, draw_precedence_relations\n\u001b[1;32m----> 4\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01msolution_methods\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mGA\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01msrc\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01minitialization\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m initialize_run\n\u001b[0;32m      5\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01msolution_methods\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mGA\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mrun_GA\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m run_GA\n\u001b[0;32m      6\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01msolution_methods\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mCP_SAT\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mrun_cp_sat\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m run_CP_SAT\n",
      "File \u001b[1;32m~\\Downloads\\Job_Shop_Scheduling_Benchmark_Environments_and_Instances-main\\solution_methods\\GA\\src\\initialization.py:8\u001b[0m\n\u001b[0;32m      5\u001b[0m \u001b[38;5;66;03m# from multiprocessing.pool import Pool\u001b[39;00m\n\u001b[0;32m      7\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mnumpy\u001b[39;00m \u001b[38;5;28;01mas\u001b[39;00m \u001b[38;5;21;01mnp\u001b[39;00m\n\u001b[1;32m----> 8\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mdeap\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m base, creator, tools\n\u001b[0;32m     10\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01msolution_methods\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mGA\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01msrc\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01moperators\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m (\n\u001b[0;32m     11\u001b[0m     evaluate_individual, evaluate_population, init_individual, init_population,\n\u001b[0;32m     12\u001b[0m     mutate_sequence_exchange, mutate_shortest_proc_time, pox_crossover)\n\u001b[0;32m     13\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01msolution_methods\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mhelper_functions\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m set_seeds\n",
      "\u001b[1;31mModuleNotFoundError\u001b[0m: No module named 'deap'"
     ]
    }
   ],
   "source": [
    "from data_parsers.custom_instance_parser import parse\n",
    "from plotting.drawer import plot_gantt_chart, draw_precedence_relations\n",
    "\n",
    "from solution_methods.GA.src.initialization import initialize_run\n",
    "from solution_methods.GA.run_GA import run_GA\n",
    "from solution_methods.CP_SAT.run_cp_sat import run_CP_SAT\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "3c959732-9668-453b-9f70-8992149f881b",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple\n",
      "Collecting absl-py==2.1.0\n",
      "  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/a2/ad/e0d3c824784ff121c03cc031f944bc7e139a8f1870ffd2845cc2dd76f6c4/absl_py-2.1.0-py3-none-any.whl (133 kB)\n",
      "Installing collected packages: absl-py\n",
      "Successfully installed absl-py-2.1.0\n",
      "Note: you may need to restart the kernel to use updated packages.\n"
     ]
    }
   ],
   "source": [
    "pip install absl-py==2.1.0\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "92c4b4d3-6380-4036-9c67-fe5f3108ffed",
   "metadata": {},
   "outputs": [
    {
     "ename": "SyntaxError",
     "evalue": "invalid syntax (2884395482.py, line 1)",
     "output_type": "error",
     "traceback": [
      "\u001b[1;36m  Cell \u001b[1;32mIn[5], line 1\u001b[1;36m\u001b[0m\n\u001b[1;33m    pip install -r requirements.txt\u001b[0m\n\u001b[1;37m        ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m invalid syntax\n"
     ]
    }
   ],
   "source": [
    "pip install -r requirements.txt\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "558da4c8-cbf9-454f-8801-b22a56bcb86c",
   "metadata": {},
   "outputs": [
    {
     "ename": "SyntaxError",
     "evalue": "invalid syntax (3373891709.py, line 1)",
     "output_type": "error",
     "traceback": [
      "\u001b[1;36m  Cell \u001b[1;32mIn[7], line 1\u001b[1;36m\u001b[0m\n\u001b[1;33m    pip install absl-py==2.1.0\u001b[0m\n\u001b[1;37m        ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m invalid syntax\n"
     ]
    }
   ],
   "source": [
    "pip install absl-py==2.1.0\n",
    "pip install cloudpickle==3.1.0\n",
    "pip install colorama==0.4.6\n",
    "pip install contourpy==1.3.0\n",
    "pip install cycler==0.12.1\n",
    "pip install deap==1.4.1\n",
    "pip install Farama-Notifications==0.0.4\n",
    "pip install filelock==3.16.1\n",
    "pip install fonttools==4.54.1\n",
    "pip install fsspec==2024.10.0\n",
    "pip install gurobipy==11.0.3\n",
    "pip install gymnasium==1.0.0\n",
    "pip install immutabledict==4.2.0\n",
    "pip install jinja2==3.1.4\n",
    "pip install kiwisolver==1.4.7\n",
    "pip install MarkupSafe==3.0.2\n",
    "pip install matplotlib==3.9.2\n",
    "pip install mpmath==1.3.0\n",
    "pip install networkx==3.4.2\n",
    "pip install numpy==2.1.3\n",
    "pip install ortools==9.11.4210\n",
    "pip install packaging==24.2\n",
    "pip install pandas==2.2.3\n",
    "pip install pillow==11.0.0\n",
    "pip install protobuf==5.26.1\n",
    "pip install pyparsing==3.2.0\n",
    "pip install python-dateutil==2.9.0.post0\n",
    "pip install pytz==2024.2\n",
    "pip install simpy==4.1.1\n",
    "pip install six==1.16.0\n",
    "pip install sympy==1.13.1\n",
    "pip install tomli==2.0.2\n",
    "pip install torch==2.5.1\n",
    "pip install tqdm==4.67.0\n",
    "pip install typing-extensions==4.12.2\n",
    "pip install tzdata==2024.2\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "2c8edee8-4b18-423b-b33a-f649abc93f05",
   "metadata": {},
   "outputs": [
    {
     "ename": "SyntaxError",
     "evalue": "invalid syntax (3373891709.py, line 1)",
     "output_type": "error",
     "traceback": [
      "\u001b[1;36m  Cell \u001b[1;32mIn[9], line 1\u001b[1;36m\u001b[0m\n\u001b[1;33m    pip install absl-py==2.1.0\u001b[0m\n\u001b[1;37m        ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m invalid syntax\n"
     ]
    }
   ],
   "source": [
    "pip install absl-py==2.1.0\n",
    "pip install cloudpickle==3.1.0\n",
    "pip install colorama==0.4.6\n",
    "pip install contourpy==1.3.0\n",
    "pip install cycler==0.12.1\n",
    "pip install deap==1.4.1\n",
    "pip install Farama-Notifications==0.0.4\n",
    "pip install filelock==3.16.1\n",
    "pip install fonttools==4.54.1\n",
    "pip install fsspec==2024.10.0\n",
    "pip install gurobipy==11.0.3\n",
    "pip install gymnasium==1.0.0\n",
    "pip install immutabledict==4.2.0\n",
    "pip install jinja2==3.1.4\n",
    "pip install kiwisolver==1.4.7\n",
    "pip install MarkupSafe==3.0.2\n",
    "pip install matplotlib==3.9.2\n",
    "pip install mpmath==1.3.0\n",
    "pip install networkx==3.4.2\n",
    "pip install numpy==2.1.3\n",
    "pip install ortools==9.11.4210\n",
    "pip install packaging==24.2\n",
    "pip install pandas==2.2.3\n",
    "pip install pillow==11.0.0\n",
    "pip install protobuf==5.26.1\n",
    "pip install pyparsing==3.2.0\n",
    "pip install python-dateutil==2.9.0.post0\n",
    "pip install pytz==2024.2\n",
    "pip install simpy==4.1.1\n",
    "pip install six==1.16.0\n",
    "pip install sympy==1.13.1\n",
    "pip install tomli==2.0.2\n",
    "pip install torch==2.5.1\n",
    "pip install tqdm==4.67.0\n",
    "pip install typing-extensions==4.12.2\n",
    "pip install tzdata==2024.2\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "fb439262-e9ba-4f58-a557-8f5d39108ee3",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple\n",
      "Requirement already satisfied: absl-py==2.1.0 in c:\\users\\l\\anaconda3\\lib\\site-packages (from -r requirements.txt (line 1)) (2.1.0)\n",
      "Requirement already satisfied: cloudpickle==3.1.0 in c:\\users\\l\\anaconda3\\lib\\site-packages (from -r requirements.txt (line 2)) (3.1.0)\n",
      "Requirement already satisfied: colorama==0.4.6 in c:\\users\\l\\anaconda3\\lib\\site-packages (from -r requirements.txt (line 3)) (0.4.6)\n",
      "Requirement already satisfied: contourpy==1.3.0 in c:\\users\\l\\anaconda3\\lib\\site-packages (from -r requirements.txt (line 4)) (1.3.0)\n",
      "Requirement already satisfied: cycler==0.12.1 in c:\\users\\l\\anaconda3\\lib\\site-packages (from -r requirements.txt (line 5)) (0.12.1)\n",
      "Requirement already satisfied: deap==1.4.1 in c:\\users\\l\\anaconda3\\lib\\site-packages (from -r requirements.txt (line 6)) (1.4.1)\n",
      "Requirement already satisfied: Farama-Notifications==0.0.4 in c:\\users\\l\\anaconda3\\lib\\site-packages (from -r requirements.txt (line 7)) (0.0.4)\n",
      "Requirement already satisfied: filelock==3.16.1 in c:\\users\\l\\anaconda3\\lib\\site-packages (from -r requirements.txt (line 8)) (3.16.1)\n",
      "Requirement already satisfied: fonttools==4.54.1 in c:\\users\\l\\anaconda3\\lib\\site-packages (from -r requirements.txt (line 9)) (4.54.1)\n",
      "Requirement already satisfied: fsspec==2024.10.0 in c:\\users\\l\\anaconda3\\lib\\site-packages (from -r requirements.txt (line 10)) (2024.10.0)\n",
      "Requirement already satisfied: gurobipy==11.0.3 in c:\\users\\l\\anaconda3\\lib\\site-packages (from -r requirements.txt (line 11)) (11.0.3)\n",
      "Requirement already satisfied: gymnasium==1.0.0 in c:\\users\\l\\anaconda3\\lib\\site-packages (from -r requirements.txt (line 12)) (1.0.0)\n",
      "Requirement already satisfied: immutabledict==4.2.0 in c:\\users\\l\\anaconda3\\lib\\site-packages (from -r requirements.txt (line 13)) (4.2.0)\n",
      "Requirement already satisfied: jinja2==3.1.4 in c:\\users\\l\\anaconda3\\lib\\site-packages (from -r requirements.txt (line 14)) (3.1.4)\n",
      "Requirement already satisfied: kiwisolver==1.4.7 in c:\\users\\l\\anaconda3\\lib\\site-packages (from -r requirements.txt (line 15)) (1.4.7)\n",
      "Requirement already satisfied: MarkupSafe==3.0.2 in c:\\users\\l\\anaconda3\\lib\\site-packages (from -r requirements.txt (line 16)) (3.0.2)\n",
      "Requirement already satisfied: matplotlib==3.9.2 in c:\\users\\l\\anaconda3\\lib\\site-packages (from -r requirements.txt (line 17)) (3.9.2)\n",
      "Requirement already satisfied: mpmath==1.3.0 in c:\\users\\l\\anaconda3\\lib\\site-packages (from -r requirements.txt (line 18)) (1.3.0)\n",
      "Requirement already satisfied: networkx==3.4.2 in c:\\users\\l\\anaconda3\\lib\\site-packages (from -r requirements.txt (line 19)) (3.4.2)\n",
      "Requirement already satisfied: numpy==2.1.3 in c:\\users\\l\\anaconda3\\lib\\site-packages (from -r requirements.txt (line 20)) (2.1.3)\n",
      "Requirement already satisfied: ortools==9.11.4210 in c:\\users\\l\\anaconda3\\lib\\site-packages (from -r requirements.txt (line 21)) (9.11.4210)\n",
      "Requirement already satisfied: packaging==24.2 in c:\\users\\l\\anaconda3\\lib\\site-packages (from -r requirements.txt (line 22)) (24.2)\n",
      "Requirement already satisfied: pandas==2.2.3 in c:\\users\\l\\anaconda3\\lib\\site-packages (from -r requirements.txt (line 23)) (2.2.3)\n",
      "Requirement already satisfied: pillow==11.0.0 in c:\\users\\l\\anaconda3\\lib\\site-packages (from -r requirements.txt (line 24)) (11.0.0)\n",
      "Requirement already satisfied: protobuf==5.26.1 in c:\\users\\l\\anaconda3\\lib\\site-packages (from -r requirements.txt (line 25)) (5.26.1)\n",
      "Requirement already satisfied: pyparsing==3.2.0 in c:\\users\\l\\anaconda3\\lib\\site-packages (from -r requirements.txt (line 26)) (3.2.0)\n",
      "Requirement already satisfied: python-dateutil==2.9.0.post0 in c:\\users\\l\\anaconda3\\lib\\site-packages (from -r requirements.txt (line 27)) (2.9.0.post0)\n",
      "Requirement already satisfied: pytz==2024.2 in c:\\users\\l\\anaconda3\\lib\\site-packages (from -r requirements.txt (line 28)) (2024.2)\n",
      "Requirement already satisfied: simpy==4.1.1 in c:\\users\\l\\anaconda3\\lib\\site-packages (from -r requirements.txt (line 29)) (4.1.1)\n",
      "Requirement already satisfied: six==1.16.0 in c:\\users\\l\\anaconda3\\lib\\site-packages (from -r requirements.txt (line 30)) (1.16.0)\n",
      "Requirement already satisfied: sympy==1.13.1 in c:\\users\\l\\anaconda3\\lib\\site-packages (from -r requirements.txt (line 31)) (1.13.1)\n",
      "Requirement already satisfied: tomli==2.0.2 in c:\\users\\l\\anaconda3\\lib\\site-packages (from -r requirements.txt (line 32)) (2.0.2)\n",
      "Requirement already satisfied: torch==2.5.1 in c:\\users\\l\\anaconda3\\lib\\site-packages (from -r requirements.txt (line 33)) (2.5.1)\n",
      "Requirement already satisfied: tqdm==4.67.0 in c:\\users\\l\\anaconda3\\lib\\site-packages (from -r requirements.txt (line 34)) (4.67.0)\n",
      "Requirement already satisfied: typing-extensions==4.12.2 in c:\\users\\l\\anaconda3\\lib\\site-packages (from -r requirements.txt (line 35)) (4.12.2)\n",
      "Requirement already satisfied: tzdata==2024.2 in c:\\users\\l\\anaconda3\\lib\\site-packages (from -r requirements.txt (line 36)) (2024.2)\n",
      "Requirement already satisfied: setuptools in c:\\users\\l\\anaconda3\\lib\\site-packages (from torch==2.5.1->-r requirements.txt (line 33)) (75.1.0)\n"
     ]
    }
   ],
   "source": [
    "!pip install -r requirements.txt\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "f6517ed8-73e4-4e8b-9d08-808ea1a296d0",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python [conda env:base] *",
   "language": "python",
   "name": "conda-base-py"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.12.7"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
